﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="wfTravelScenicList1.aspx.cs" Inherits="msBsc.WebUi.wMall.Public.wfTravelScenicList1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>
    <link href="/jqPlugin/SelectSimu/css/base.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/sLayout.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/Public/sTravel.css" rel="stylesheet" />
    <link href="/themes/wStyle1/css/pagination.css" rel="stylesheet" />
    <style>
        #divPage a, #divPage span {
            color:#333; 
        }
    </style>
</head>
<body>
    <%=msBsc.WebUi.Code.QtHtmlGet.GetHeaderLoginInfo1() %>
    <div class="viewPC">
        <input type="hidden" id="countryId" value="DF6723BE-A25C-4F77-BB49-A1662D3E6F2A" />
        <input type="hidden" id="cityId" value="AEF39D8E-D298-4AF1-AEC5-2B00D237F5F5" />
        <input type="hidden" id="destionId" value="" />
        <input type="hidden" id="pageIndex" value="1" />
        <div class="condition">
            <div class="condition_titel">地区</div>
            <div class="condition_city" id="countryId_select"></div>
            <div class="condition_city" id="cityId_select"></div>
            <div class="condition_city" id="destionId_select"></div>
            <div class="condition_city" id="travel_type"></div>
        </div>
        <%-- <div class="searchResults">搜索 <span class="s_condition">马尔代夫</span> 共 <span class="s_number">13245</span> 条商品信息</div>--%>
        <ul class="travel_lit" id="travel_list">
           <%-- <li>
                <a class="travelC" href="http://www.dijieke.com/wp_TravelScenicInfo.htm?scenicId=008700D8-0F46-4541-87A5-402DE43219B8" target="_blank">
                    <img src="http://www.dijieke.com/UpLoad/scenic/1422253857_162.jpg?1422253859983 240x198img.jpg" title="快乐猩猩树上穿越公园" />
                    <div class="classicInfo" data-value="008700D8-0F46-4541-87A5-402DE43219B8">快乐猩猩树上穿越公园</div>
                </a>
            </li>
            <li>
                <a class="travelC" href="http://www.dijieke.com/wp_TravelScenicInfo.htm?scenicId=008700D8-0F46-4541-87A5-402DE43219B8" target="_blank">
                    <img src="http://www.dijieke.com/UpLoad/scenic/1422253857_162.jpg?1422253859983 240x198img.jpg" title="快乐猩猩树上穿越公园" />
                    <div class="classicInfo" data-value="008700D8-0F46-4541-87A5-402DE43219B8">快乐猩猩树上穿越公园</div>
                </a>
            </li>
            <li>
                <a class="travelC" href="http://www.dijieke.com/wp_TravelScenicInfo.htm?scenicId=008700D8-0F46-4541-87A5-402DE43219B8" target="_blank">
                    <img src="http://www.dijieke.com/UpLoad/scenic/1422253857_162.jpg?1422253859983 240x198img.jpg" title="快乐猩猩树上穿越公园" />
                    <div class="classicInfo" data-value="008700D8-0F46-4541-87A5-402DE43219B8">快乐猩猩树上穿越公园</div>
                </a>
            </li>
            <li>
                <a class="travelC" href="http://www.dijieke.com/wp_TravelScenicInfo.htm?scenicId=008700D8-0F46-4541-87A5-402DE43219B8" target="_blank">
                    <img src="http://www.dijieke.com/UpLoad/scenic/1422253857_162.jpg?1422253859983 240x198img.jpg" title="快乐猩猩树上穿越公园" />
                    <div class="classicInfo" data-value="008700D8-0F46-4541-87A5-402DE43219B8">快乐猩猩树上穿越公园</div>
                </a>
            </li>
            <li>
                <a class="travelC" href="http://www.dijieke.com/wp_TravelScenicInfo.htm?scenicId=008700D8-0F46-4541-87A5-402DE43219B8" target="_blank">
                    <img src="http://www.dijieke.com/UpLoad/scenic/1422253857_162.jpg?1422253859983 240x198img.jpg" title="快乐猩猩树上穿越公园" />
                    <div class="classicInfo" data-value="008700D8-0F46-4541-87A5-402DE43219B8">快乐猩猩树上穿越公园</div>
                </a>
            </li>
            <li>
                <a class="travelC" href="http://www.dijieke.com/wp_TravelScenicInfo.htm?scenicId=008700D8-0F46-4541-87A5-402DE43219B8" target="_blank">
                    <img src="http://www.dijieke.com/UpLoad/scenic/1422253857_162.jpg?1422253859983 240x198img.jpg" title="快乐猩猩树上穿越公园" />
                    <div class="classicInfo" data-value="008700D8-0F46-4541-87A5-402DE43219B8">快乐猩猩树上穿越公园</div>
                </a>
            </li>--%>
        </ul>
        <div class="jpage" id="divPage"></div>
        <xmp id="svc_list_temp" style="display: none;">
            {{#for(var i=0,len=d.rows.length;i < len;i++){ }}
                 <li>
                <a class="travelC" href="http://www.dijieke.com/wp_TravelScenicInfo.htm?scenicId={{d.rows[i].SCENIC_ID}}" target="_blank">
                    <img src="http://www.dijieke.com/UpLoad/scenic/{{d.rows[i].SCENIC_DEFAULT_PIC}} 240x198img.jpg" title="{{d.rows[i].SCENIC_NAME}}" />
                    <div class="classicInfo" data-value="{{d.rows[i].SCENIC_ID}}">{{d.rows[i].SCENIC_NAME}}</div>
                </a>
            </li> 
            {{#} }}
        </xmp>
    </div>
    <!--start JS引用-->
    <script src="/jqPlugin/js/jquery-1.8.3.min.js"></script>
    <script src="/jqPlugin/js/jBase.js"></script>
    <script src="/jqPlugin/js/jBPage.js"></script>
    <script src="/jqPlugin/js/laytpl.js"></script>
    <script src="/jqPlugin/SelectSimu/js/SelectSimu.js"></script>
    <script src="/themes/wStyle1/js/comm/jsLayout.js"></script>
    <script src="/themes/wStyle1/js/comm/jsPagination.js"></script>
    <script src="/themes/wStyle1/js/comm/VerifyJs.js"></script>
    <!--end JS引用-->
    <script type="text/javascript">
        setArea("countryId_select", 82, 1, 1, ["DF6723BE-A25C-4F77-BB49-A1662D3E6F2A"], ["中国"]);
        setArea("cityId_select", 82, 2, 2, ["AEF39D8E-D298-4AF1-AEC5-2B00D237F5F5"], ["北京"]);
        setArea("destionId_select", 82, 3, 1, [""], ["全部"]);
        setArea("travel_type", 82, 4, 3, ["景点", "美食", "购物"], ["景点", "美食", "购物"]);
        (function () {
            //if (IsNull(GetQueryStr("countryId"))) {
            //    $("#countryId").val("DF6723BE-A25C-4F77-BB49-A1662D3E6F2A");
            //    $("#cityId").val("AEF39D8E-D298-4AF1-AEC5-2B00D237F5F5");
            //    $("#destionId").val("");
            //}
            $("#countryId").val(GetQueryStr("countryId"));
            $("#cityId").val(GetQueryStr("cityId"));
            $("#destionId").val(GetQueryStr("destionId"));
            $("#pageIndex").val(GetQueryStr("pIndex"));

            btnDo("getScenicList");
        })()
        function btnDo(sEbtn) {
            GtGrid1Action = sEbtn;
            var opart = new jsonRow();
            if (sEbtn == "getScenicList") {
                opart = GetGtParam();
            } else if (sEbtn == "getCity") {
                opart.AddCell("countryId", countryId);
                opart.AddCell("ACTION", GtGrid1Action);
            }
            ajaxComm(opart);
        };
        //执行AJAX调用时获取参数
        function GetGtParam() {
            var pIndex = $("#pageIndex").val();
            if (IsNull(pIndex) || isNaN(pIndex)) {
                pIndex = 1;
            }
            var _jsParam = new jsonRow();
            _jsParam.AddCell("pageRows", "15");
            _jsParam.AddCell("pageNum", pIndex);
            _jsParam.AddCell("parentsId", "00000000-0000-0000-0000-000000000000");
            _jsParam.AddCell("isAll", "true");
            _jsParam.AddCell("destionId", $("#destionId").val());
            _jsParam.AddCell("cityId", $("#cityId").val());
            _jsParam.AddCell("countryId", $("#countryId").val());
            _jsParam.AddCell("ACTION", GtGrid1Action);
            return _jsParam;
        };

        function setArea(input, width, zIndex, listNum, listValue, listOption) {
            $("#" + input).SelectSimu({
                width: width,
                zIndex: zIndex,
                listNum: listNum,
                listValue: listValue,
                listOption: listOption,
                imgSrc: '/jqPlugin/SelectSimu/img/icon_down.png'
            })
        }

        function updateSelet(inputId, data, selectId) {
            var selectValue = $("#" + inputId + " .selectList ul");
            selectValue.html("");
            var isSelect = false;
            for (var i = 0; i < data.rows.length; i++) {
                if (selectId == data.rows[i].COUNTRY_CITY_ID) {
                    $("#" + inputId + " input").val(data.rows[i].COUNTRY_CITY_ID);
                    $("#" + inputId + " span").text(data.rows[i].COUNTRY_CITY_NME);
                    isSelect = true;
                }
                selectValue.append('<li data-value="' + data.rows[i].COUNTRY_CITY_ID + '">' + data.rows[i].COUNTRY_CITY_NME + '</li>');
            }
            if (isSelect == false && data.rows.length > 0) {
                $("#" + inputId + " input").val(data.rows[0].COUNTRY_CITY_ID);
                $("#" + inputId + " span").text(data.rows[0].COUNTRY_CITY_NME);
            }
        }

        function laySvcList(svcListData, rows) {
            var _html = $('#svc_list_temp').html();
            //$("#scenicList").html("");
            laytpl(_html).render(svcListData, function (render) {
                $("#travel_list").html(render);
            });
            var pIndex = $("#pageIndex").val();
            if (IsNull(pIndex) || isNaN(pIndex)) {
                pIndex = 1;
            }
            jsPage('divPage', rows, 15, pIndex, 'goPage');
        };
        //laySvcList();
        function goPage(pIndex) {
            var countryId = $("#countryId").val();
            var cityId = $("#cityId").val();
            var destionId = $("#destionId").val();
            window.location.href = "/wp_TravelScenicList1.htm?countryId=" + countryId + "&cityId=" + cityId + "&destionId=" + destionId + "&pIndex=" + pIndex;
        }
    </script>
</body>
</html>
